package com.TanNgee.excpetion;

/**
 * @author 陈毅
 * @create 2022/3/20 10:58
 */

import com.TanNgee.enums.RpcErrorMessageEnum;

/**
 * 自定义RPC异常
 */
public class RpcException extends RuntimeException {
    public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum, String detail) {
        super(rpcErrorMessageEnum.getMessage() + ":" + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum) {
        super(rpcErrorMessageEnum.getMessage());
    }


}
